package com.shzu.jwc.ty.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.shzu.jwc.ty.bean.PeExaminationClass;
import com.shzu.jwc.ty.dao.PeExaminationClassMapper;

@Service
public class PeExaminationClassService {

	@Autowired
	PeExaminationClassMapper mapper;
	
	public List<PeExaminationClass> getclass()
	{
		return mapper.selectByExample(null);
	}
	
	public Integer insert(PeExaminationClass peExaminationClass)
	{
		return mapper.insert(peExaminationClass);
	}
	
	public Integer delete(Integer peExaminationClassId)
	{
		return mapper.deleteByPrimaryKey(peExaminationClassId);
	}
	
	public Integer update(Integer id,String column,String value)
	{
		PeExaminationClass peExaminationClass=new PeExaminationClass();
		peExaminationClass.setPeExaminationClassId(id);
		peExaminationClass.setPeExaminationClassName(value);
		return mapper.updateByPrimaryKey(peExaminationClass);
	}

}
